using AppToolKit.Model.Validation;
using System;
using System.Collections.Generic;
namespace AppToolKit.Business
{
	public interface IBusiness<T> where T : class
	{
		BusinessSupport Support
		{
			get;
			set;
		}
		IEntityFactory<T> Factory
		{
			get;
			set;
		}
		void Refresh(T entity);
		T Load(object key);
		void Delete(T entity, Opeartion op);
		void Save(T entity, Opeartion op);
		void Update(T entity, Opeartion op);
		T Create();
		IList<T> GetListByPage(string query, int start, int Max);
		IList<T> GetList(string query);
		IList<T> GetList(string query, params object[] args);
		IList<T> GetAll();
		void Delete(string queryString);
		ValidateResultSet Valid(T data, ValidateBehavior behavior);
		ValidateResultSet Valid(string property, object entity, object value, ValidateBehavior behavior);
		void SaveWithoutPublish(T entity, Opeartion op);
		void UpdateWithoutPublish(T entity, Opeartion op);
	}
}
